/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 说明：
 * Entity Name 折扣表
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TDiscount")
public class TDiscount implements Serializable{

	private static final long serialVersionUID = 1L;

	private String DiscountID;//折扣编号 CHAR(15) PK
	
	private Date StartDate;//开始日期
	
	private Date EndDate;//结束日期[开始,结束) 前闭后开区间
	
	private double Discount;//折扣DECIMAL(20,3)
	
	private String DirID;//折扣适用目录CHAR(15)
	
	private byte DirType;//折扣适用目录类型TINYINT1为适用目录 2为适用商品
	
	private String Operator;//操作人CHAR(15)
	
	private Date HappenTime;//操作时间DATETIME
	
	private boolean IsUsed;//是否已经有订单使用    一旦有订单已经使用过该折扣规则，则该规则不能删除，只能暂停

	private String Valid;//是否有效CHAR(18)

	@Id
	@Column(name = "DiscountID", length=15)
	public String getDiscountID() {
		return DiscountID;
	}

	public void setDiscountID(String discountID) {
		DiscountID = discountID;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "StartDate", nullable = false, length = 19)
	public Date getStartDate() {
		return StartDate;
	}

	public void setStartDate(Date startDate) {
		StartDate = startDate;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "EndDate", nullable = false, length = 19)
	public Date getEndDate() {
		return EndDate;
	}

	public void setEndDate(Date endDate) {
		EndDate = endDate;
	}

	@Column(name = "Discount", precision = 20, scale = 3)
	public double getDiscount() {
		return Discount;
	}

	public void setDiscount(double discount) {
		Discount = discount;
	}

	@Column(name = "DirID", length=15)
	public String getDirID() {
		return DirID;
	}

	public void setDirID(String dirID) {
		DirID = dirID;
	}

	@Column(name = "DirType")
	public byte getDirType() {
		return DirType;
	}

	public void setDirType(byte dirType) {
		DirType = dirType;
	}

	@Column(name = "Operator", length=15)
	public String getOperator() {
		return Operator;
	}

	public void setOperator(String operator) {
		Operator = operator;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HappenTime", nullable = false, length = 19)
	public Date getHappenTime() {
		return HappenTime;
	}

	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}

	@Column(name = "IsUsed")
	public boolean isIsUsed() {
		return IsUsed;
	}

	public void setIsUsed(boolean isUsed) {
		IsUsed = isUsed;
	}

	@Column(name = "Valid", length=18)
	public String getValid() {
		return Valid;
	}

	public void setValid(String valid) {
		Valid = valid;
	}
}
